package com.moli.iov.handle.alarm.enums;

/**
 * <p>
 *  报警类型 状态 1、正在报警  2、报警取消
 * </p>
 *
 * @author: zql
 * @Date: 2019/2/20 9:55
 */
public enum AlarmCodeStatusEnum {

    /**
     * 正在报警
     */
    ALARMING(true, "正在报警"),

    /**
     * 报警取消
     */
    ALARM_CANCELLED(false, "报警取消");

    private boolean flag;

    private String msg;

    AlarmCodeStatusEnum(boolean flag, String msg){
        this.flag = flag;
        this.msg = msg;
    }

    public static String getMsg(boolean flag){
        for(AlarmCodeStatusEnum e : AlarmCodeStatusEnum.values()){
            if(e.flag == flag){
                return e.msg;
            }
        }
        return "";
    }

    public boolean getFlag() {
        return flag;
    }


    public String getMsg() {
        return msg;
    }

}
